<template>
 <!-- border -->
	<div 
    class="border"
    :style="{height: ruleFormLocal.borderHeight + 'px',backgroundColor: ruleFormLocal.borderWrapColor}"
  >
      <!-- 图片模板 -->
    <!-- <option-right v-if="dateFactory.activeBorder">
      <div class="option-wrap">
        <el-form 
          :model="ruleFormLocal"   
          label-width="100px"
        >
          <div class="edit-componet-title">
            边框样式
          </div>
          <el-form-item label="框体高度" prop="borderHeight">
            <div class="side">
              <el-slider 
                v-model="ruleFormLocal.borderHeight"
                :min="0" 
                :max="30"
              ></el-slider>
              <span>{{ruleFormLocal.borderHeight}}像素</span>
            </div>
          </el-form-item>
          <el-form-item label="背景颜色" prop="borderWrapColor">
            <div class="border-wrap">
              <el-color-picker v-model="ruleFormLocal.borderWrapColor" size="small" ></el-color-picker>
              <el-link type="primary" :underline="false" @click="ruleFormLocal.borderWrapColor == '#fff'">重置</el-link>
            </div>
          </el-form-item>
          
        </el-form>
      </div>
    </option-right> -->
  </div>
</template>

<script>
export default {
  name: 'DiyBorder',
  props: {
    dateFactory: Object,
    index: Number,
    diyData: Array,
  },
  data() {
    return {
      ruleFormLocal:this.dateFactory.ruleForm,
    }
  },
  computed: {
    
  },
  watch: {
    ruleFormLocal: {
      handler: function (newValue) {
        console.log(newValue, 'newValuenewValuenewValue')
        this.diyData[this.index].ruleForm = newValue
        this.$EventBus.$emit('diyFactory', this.diyData)
      },
      deep: true,
    }
  },
  mounted() {
    
  },
  methods: {

  },
}
</script>

<style lang="less" scoped>
	.border {
		width: 100%;
		height: 12px;
		background-color: #f7f7f7;
  }
   .option-wrap {
    .el-form  {
      .edit-componet-title {
        margin-bottom: 15px;
        padding-bottom: 7px;
        border-bottom: 1px solid #e5e5e5;
        font-size: 14px;
      }
      .el-form-item {
        // 模板模块
        .templat {
          display: flex;
          align-items: center;
          .template-style {
              width: 100px;
              height: 100px;
              display: inline-block;
              border: 1px solid #e5e5e5;
              margin: 0 10px 15px 0;
              padding-top: 5px;
              background-color: #fff;
              text-align: center;
              cursor: pointer;
              &.active {
                border-color: #38f;
              }
              .select {
                width: 100px;
                height: 64px;
                .el-image {
                  width: 90px;
                  height: 60px;
                }
              }
              .h1 {
                height: 30px;
                line-height: 30px;
              }
            }

        }
       
        .border-wrap {
          display: flex;
          align-items: center;
          .el-color-picker {
            margin-right: 12px;
          }
        }
        .radios-wrap {
          .el-radio {
            margin-top: 10px;
          }
        }
        .side {
          display: flex;
          align-items: center;
          align-items: center;
          .el-slider {
            flex: 1;
          }
          &> span {
            margin-left: 14px;
          }
        }
      }
    }
    

  }
  
</style>